package setting

import "time"

type ServerSetting struct {
	Port         string
	ReadTimeout  time.Duration
	WriteTimeout time.Duration
}

type LoggerSetting struct {
	SavePath string
	FileName string
	FileExt  string
}

// RegistrationCenter 注册中心
// 在本服务启动时，需要向其发起注册请求
type RegistrationCenter struct {
	URL  string
	Path string
}

func (s *Setting) ReadSection(k string, v interface{}) error {
	return s.vp.UnmarshalKey(k, v)
}
